import request from '@/utils/request'
export default {
  //添加
  add(data) {
    return request({
      url: '/portalWebsite/article/add',
      method: 'POST',
      data
    })
  },
  //修改
  edit(data) {
    return request({
      url: '/portalWebsite/article/edit',
      method: 'POST',
      data
    })
  },
  //列表查询
  queryList(params) {
    return request({
      url: '/portalWebsite/article/queryList',
      method: 'get',
      params
    })
  },
  //分页查询
  queryPageList(params) {
    return request({
      url: '/portalWebsite/article/queryPageList',
      method: 'get',
      params
    })
  },
  //主键删除接口
  del(id) {
    return request({
      url: '/portalWebsite/article/del',
      method: 'post',
      data: {
        navigationId: id
      }
    })
  },
  //主键批量删除接口
  delList(idList) {
    return request({
      url: '/portalWebsite/article/delList',
      method: 'post',
      data: {
        articleIdList: idList
      }
    })
  },
  //查询文章内容
  queryContent(articleId) {
    return request({
      url: `/portalWebsite/article/query?articleId=${articleId}`,
      method: 'get'
    })
  },
  //显示隐藏
  release (data) {
    return request({
      url: '/portalWebsite/article/release',
      method: 'post',
      data
    })
  },
  //查询重大转载
  queryMajorReprints () {
    return request({
      url: '/portalWebsite/article/queryMajorReprints',
      method: 'post'
    })
  },
  //设置重大转载
  setMajorReprints (data) {
    return request({
      url: '/portalWebsite/article/setMajorReprints',
      method: 'post',
      data
    })
  }
  
}